﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using BookTheBook.Data.Model;

namespace BookTheBook.Data
{
    public class NHibernateLibraryRepository : ILibraryRepository
    {
        private static readonly IBookEntitiesDbCommunicator _booksDbCommunicator = new NHibernateBookEntitiesDbCommunicator();

        public ReadOnlyCollection<Book> GetAllBooks()
        {
            return _booksDbCommunicator.GetAllBooks();
        }

        public Book GetBookById(int id)
        {
            return _booksDbCommunicator.GetBookById(id);
        }

        public void AddBookToLibrary(Book book)
        {
            throw new NotImplementedException();
        }

        public void AddBooksToLibrary(IEnumerable<Book> books)
        {
            _booksDbCommunicator.SubmitBooksToDataSource(books);
        }

        public void AddUserToLibrary(User user)
        {
            throw new NotImplementedException();
        }

        public void AddUserssToLibrary(IEnumerable<User> users)
        {
            throw new NotImplementedException();
        }
    }
}